package com.minhua.jijiehao2.utils

import android.content.Context
import android.view.View
import android.widget.ImageView
import com.bigkoo.convenientbanner.holder.Holder

/**
 * @author moo
 * @date 2017/11/29.
 * @describe
 */
class LocalImgBannerHolder : Holder<Int> {

    override fun UpdateUI(context: Context?, position: Int, data: Int?) {
        if (data != null) {
            imageView?.setImageResource(data)
        }
    }

    private var imageView: ImageView? = null
    override fun createView(context: Context?): View {
        imageView = ImageView(context)
        imageView!!.scaleType = ImageView.ScaleType.FIT_XY
        return imageView as ImageView
    }


}